public class Square extends GeometricObject {

    private double length;

    public Square() {
    }

    public Square(double width, double length) {
       this.length=length;
    }

    /** Return width */
    public double getWidth() {
        return length;
    }

    /** Set a new width */
    public void setWidth(double length) {
        this.length = length;
    }

    /** Return height */

    @Override /** Return area */
    public double getArea() {
        return length*length;
    }

    @Override /** Return perimeter */
    public double getPerimeter() {
        return length*4;
    }
}

